Skip to main content

SdexFacet

The SdexFacet is the ERC20 compliant token native to the Sigmadex platform. SDEX!. used in onchain governance as the protocol decentralizes

Functions

mint

Mints Sdex, only callable by diamond

Declaration

  function mint(
address to,
uint256 amount
) external onlyDiamond returns (bool)

Modifiers:

Modifier
onlyDiamond

Args:

ArgTypeDescription
toaddressaddress for receiving the tokens
amountuint256amount to receive

Returns:

TypeDescription
boolif successful

executiveMint

executiveMint, only callable by owner for initial token generation event, planned to be disabled after protocol bootstrap

Declaration

  function executiveMint(
address to,
uint256 amount
) external onlyOwner returns (bool)

Modifiers:

Modifier
onlyOwner

Args:

ArgTypeDescription
toaddressaddress the tokens get minted to
amountuint256amount of tokens to be minted

Returns:

TypeDescription
boolsuccess of the mint

name

returns the name of the token

Declaration

  function name(
) public returns (string)

Modifiers:

No modifiers

Returns:

TypeDescription
stringname of token

decimals

returns the amount of decimals for the token

Declaration

  function decimals(
) public returns (uint8)

Modifiers:

No modifiers

Returns:

TypeDescription
uint8amount of decimals

symbol

returns the symbol of the token

Declaration

  function symbol(
) public returns (string)

Modifiers:

No modifiers

Returns:

TypeDescription
stringname of symbol

totalSupply

Returns the amount of tokens in existence.

Declaration

  function totalSupply(
) external returns (uint256)

Modifiers:

No modifiers

Returns:

TypeDescription
uint256amount of tokens

balanceOf

Returns the amount of tokens owned by account

Declaration

  function balanceOf(
address account
) external returns (uint256)

Modifiers:

No modifiers

Args:

ArgTypeDescription
accountaddressaddress of the account in question

Returns:

TypeDescription
uint256amount of SDEX tokens

transfer

Moves amount tokens from the caller's account to recipient.

Declaration

  function transfer(
address recipient,
uint256 amount
) external returns (bool)

Modifiers:

No modifiers

Args:

ArgTypeDescription
recipientaddressthe address of who is getting the tokens
amountuint256the amount of tokens recieved

Returns:

TypeDescription
booltransfer success

Emits a {Transfer} event.

allowance

No description

Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through {transferFrom}. This is zero by default.

This value changes when {approve} or {transferFrom} are called.

Declaration

  function allowance(
) external returns (uint256)

Modifiers:

No modifiers

approve

No description

Sets amount as the allowance of spender over the caller's tokens.

Returns a boolean value indicating whether the operation succeeded.

IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729

Declaration

  function approve(
address spender,
uint256 amount
) external returns (bool)

Modifiers:

No modifiers

Args:

ArgTypeDescription
spenderaddresswho you are allowing to spend your coins
amountuint256the amount your willing to let them spend

Returns:

TypeDescription
boolapproval success

Emits an {Approval} event.

transferFrom

Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller's allowance.

Returns a boolean value indicating whether the operation succeeded.

Declaration

  function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool)

Modifiers:

No modifiers

Args:

ArgTypeDescription
senderaddressaddress of who your taking coins from
recipientaddressaddress of who your sending these coins to
amountuint256that amount of tokens that you are moving

Returns:

TypeDescription
boolsuccess of transferFrom

Emits a {Transfer} event.

_transfer

No description

Declaration

  function _transfer(
) internal

Modifiers:

No modifiers

_approve

No description

Declaration

  function _approve(
) internal

Modifiers:

No modifiers